{% extends 'index.html' %}

{% block sidebar %}
    <li><a href="/version-control/">版本管理</a></li>
{% endblock %}

{% block content %}
    <h3 class="page-header">
        已创建的项目
    </h3>
    <div class="table-responsive">
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th>项目名</th>
                    <th>项目描述</th>
                </tr>
            </thead>
            <tbody>
                {% for row in query_set %}
                    <tr nid="{{ row.id }}" style="cursor: pointer">
                        <td>{{ row.name }}</td>
                        <td>{{ row.description }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock %}

{% block custome_js %}
    <script>
        $('tr').click(function () {
            location.href=$(this).attr('nid')+"/";
        });

    </script>
{% endblock %}